package com.sunday.reactor.test;

/**
 * @author xuqingxin 2021/3/12 2:41 下午
 */
public class LinkedNodeDemo {

    public static ListNode reverseList(ListNode node) {
        ListNode node1 = null;
        ListNode cur = node;
        while (cur != null) {
            ListNode next = cur.next;
            cur.next = node1;
            node1 = cur;
            cur = next;
        }
        return node1;
    }


}

class ListNode {
    String value;
    ListNode next;

    public ListNode() {
    }

    public ListNode(String value, ListNode next) {
        this.value = value;
        this.next = next;
    }
}